import request from '@/utils/request'

// 科室查询
export function getDepartmentList(params) {
    return request({
        url: '/med-admin-medical-management/department/getDepartment',
        method: 'get',
        params
    })
}

// 科室状态修改
export function updateDepartmentStatus(departmentId) {
    return request({
        url: '/med-admin-medical-management/department/updateStatus/' + departmentId,
        method: 'put',
    })
}

// 获取所有父级科室
export function getParentDepartment() {
    return request({
        url: '/med-admin-medical-management/department/getParentDepartment',
        method: 'get',
    })
}


// 科室添加
export function addDepartment(data) {
    return request({
        url: '/med-admin-medical-management/department/addDepartment',
        method: 'post',
        data
    })
}

// 修改科室
export function updateDepartment(data) {
    return request({
        url: '/med-admin-medical-management/department/updateDepartmentInfo',
        method: 'post',
        data
    })
}

// 删除科室
export function delDepartment(departmentId) {
    return request({
        url: '/med-admin-medical-management/department/deleteDepartment/' + departmentId,
        method: 'delete',
    })
}

